﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wyse.Server.Base;

namespace Wyse.Tests
{
    /// <summary>
    /// IMessageProcessor implementation whcihc buffers received messages
    /// </summary>
    public class MessageBuffer : IMessageProcessor
    {
        /// <summary>
        /// Buffers the message
        /// </summary>
        /// <param name="msg"></param>
        public void ProcessMessage(Message msg)
        {
            mMessages.Add(msg);
        }

        /// <summary>
        /// Gets the message buffer
        /// </summary>
        public List<Message> Messages
        {
            get { return mMessages; }
        }

        private List<Message> mMessages = new List<Message>();
    }
}
